package com.myproject.sbp.apollo.controller;

import com.myproject.sbp.apollo.conf.TestBean1;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 情况一
 * 第一种方式，测试
 * @author ywh
 */
@RestController
public class ApolloController1 {

    @Resource
    private TestBean1 testBean1;

    @ResponseBody
    @GetMapping("/testBean1")
    public Object testBean1(){
        return testBean1.getName();
    }

}